{{ if $.Param "enableSidebar" }}

<div class="sidebar">
    {{ partial "search/site-search" . }}
    {{ partial "sidebar/custom-list" . }}
    {{ if .Site.Params.itemsPerCategory }}
    {{ range first .Site.Params.itemsPerCategory .Pages }}
    <section class="sidebar-recent">
        <a href="{{ .RelPermalink }}" class="sidebar-recent__title p1">{{ .Title }}</a>
        <ul class="sidebar-recent__ul">
            {{ range first .Site.Params.itemsPerCategory .Pages }}
            <li><a href="{{ .RelPermalink }}" class="sidebar-recent__a p2">{{ .Title }}</a>
            </li>
            {{ end }}
        </ul>
    </section>
    {{ end }}
    {{ end }}
</div>

<hr class="hr-fade sidebar-hr" />
<div class="taxo-root">
{{ partial "taxonomy/taxonomy-tags" . }}
{{ partial "taxonomy/taxonomy-categories" . }}
{{ partial "taxonomy/taxonomy-series" . }}
</div>

{{ end }}